﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Baosight.ZNH.ZMCA.UI.Utils;
using Telerik.Windows.Controls.Gauges;

namespace Baosight.ZNH.ZMCA.UI.Controls
{
    /// <summary>
    /// 双联仪表盘控件
    /// 使用该控件时可以设置leftNeedle.Value和rightNeedle.Value来设置指标值
    /// 可以设置leftDesc.Text和rightDesc.Text来显示补充信息，如单位信息
    /// 可以通过调用leftControler和rightControler的SetMarkerValer方法设置警告值和安全值
    /// </summary>
    public partial class DoubleCircleGauge : UserControl
    {
        public RadialGaugeControler leftControler;
        public RadialGaugeControler rightControler;
        private string leftTag = "";
        private string rightTag = "";
        public string LeftTag
        {
            get
            {
                return this.leftTag;
            }
            set
            {
                this.leftTag = value;
            }
        }
        public string RightTag
        {
            get
            {
                return this.rightTag;
            }
            set
            {
                this.rightTag = value;
            }
        }

        public DoubleCircleGauge()
        {
            InitializeComponent();
            RadialGaugeControler.InitRadialScale(leftGauge, leftRadialScale, new TextBlock[]{leftGaugeDescription});
            RadialGaugeControler.InitRadialScale(rightGauge, rightRadialScale, new TextBlock[]{rightGaugeDescription});
            leftControler = new RadialGaugeControler(leftRadialScale, leftRadialBar, leftNeedle, leftMarkerWarning, leftMarkerPass, leftNumericIndicator);
            rightControler = new RadialGaugeControler(rightRadialScale, rightRadialBar, rightNeedle, rightMarkerWarning, rightMarkerPass, rightNumericIndicator);

            //    说明字：#4f4637 R:79 G:70 B:55
            
        }
    }
}
